/*
 *    Copyright (c) 2018-2025, nart All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: nart
 */

package com.nai365.nart.operation.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 优先购使用记录
 *
 * @author baogs
 * @date 2022-07-01 11:13:16
 */
@Data
@Builder
@TableName("opt_preemption_use")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "优先购使用记录")
public class PreemptionUse extends Model<PreemptionUse> {

	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "id")
	private Long id;

	/**
	 * 优先购id
	 */
	@ApiModelProperty(value = "优先购id")
	private Long preemptionId;

	/**
	 * 用户id
	 */
	@ApiModelProperty(value = "用户id")
	private Long userId;

	/**
	 * quantity
	 */
	@ApiModelProperty(value = "quantity")
	private Integer quantity;

	/**
	 * 使用时间
	 */

	@ApiModelProperty(value = "使用时间")
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createTime;

	/**
	 * 订单id
	 */
	@ApiModelProperty(value = "订单编号")
	private String orderNo;

	/**
	 * delFlag
	 */
	@TableLogic(value = "0", delval = "1")
	@ApiModelProperty(value = "delFlag")
	private String delFlag;


}
